﻿
using Cosmos.DataAccess.Trade.HighGate.v1;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cosmos.DataAccess.Trade.HighGate.Internals.Protocol
{
    public class DataPushJob
    {
        public event PushedEventHandler<DataResponse> Pushed;

        public DataSubscription Subscription { get; set; }
        internal DataSessionController Session { get; set; }
        public bool IsBad { get; set; }
        public void RaisePushedEvent(DataResponse data_response)
        {
            //Logger.Info(Pushed.Target.ToString()); 
            Pushed?.Invoke(this, data_response);
        }
        public void Stop()
        {
            Session?.StopPushJob(this);
            Pushed = null;
        }
    }
}
